﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CatalogTree.ascx.cs"
    Inherits="WUC_CatalogTree" %>
<style type="text/css">
    .TableNoborder01
    {
        border: 0px solid #000;
        border-collapse: collapse;
    }
    .TableNoborder01 td
    {
        border: 0px solid #000;
        height: 5px;
    }
    .TableNoborder01 th
    {
        border: 0px solid #000;
        height: 25px;
        background-color: Transparent;
    }
</style>
<div>
    <table border="0" cellspacing="0" cellpadding="0" align="left">
        <tr>
            <td>
                <asp:TextBox ID="tbName" runat="server" CssClass="input12" Enabled="false"></asp:TextBox><asp:Label
                    ID="lblSign" runat="server" Text="*" ForeColor="red"></asp:Label>
                <asp:RequiredFieldValidator ID="valrArea" runat="server" ControlToValidate="tbID"
                    Display="Dynamic"></asp:RequiredFieldValidator>
            </td>
            <td>
                <input id="tbSelect" type="button" value="请选择" runat="server" />
                <asp:Button ID="btnReset" runat="server" Text="清空" CssClass="Btn_bse37" />
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <div style="z-index: 10; position: absolute; width: 200px; display: none;" id="<%=ClientID %>_divTree">
                    <table width="200" border="0" cellspacing="0" cellpadding="0" class="TablebTitle">
                        <tr>
                            <td valign="top">
                                <div style="width: 200px; height: 260px; overflow: auto; border: 1px solid #CCC;
                                    background-color: #FFF; margin-left: 0px;">
                                    <asp:TreeView ID="tvEntity" runat="server" ExpandDepth="10" CssClass="TableNoborder01">
                                    </asp:TreeView>
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
    </table>
</div>
<div style="display: none;">
    <asp:TextBox ID="tbID" runat="server"></asp:TextBox>
</div>

<script type="text/javascript">
function <%=ClientID %>VisDiv() 
{ 
    document.getElementById("<%=ClientID %>_divTree").style.display = '';//显示该层 
}
function <%=ClientID %>HidDiv() 
{ 
    document.getElementById("<%=ClientID %>_divTree").style.display = 'none';//隐藏该层 
}
function <%=ClientID %>ChangeUrl(name,id)
{
    document.getElementById("<%= this.tbName.ClientID %>").value = name;
    document.getElementById("<%= this.tbID.ClientID %>").value = id;  
    document.getElementById("<%=ClientID %>_divTree").style.display = 'none';
}
if ( document.all )
{ document.body.onclick =							
    function()																
    {																		
        oEl = event.srcElement;												
        if( oEl.id.indexOf('tbSelect') != -1 )
        {
            
        }
        else if(oEl.id.indexOf('_divTree') == -1)					
        {																	
	        for(i = 0;i < document.all.length; i++)							
	        {																
		        if(document.all(i).id.indexOf( '_divTree' ) != -1)		
		        {															
			        document.all(i).style.display = 'none';					
		        }															
	        }																
        }																	
        else{ }																
    }																		
};		
</script>

